import React ,{ Suspense }from 'react';
import { HashRouter, Routes, Route, Navigate } from 'react-router-dom'
import { ConfigProvider } from 'antd'
import zhCN from 'antd/es/locale/zh_CN';
import Register from './pages/register'
import Login from './pages/login'
import Index from './pages/index'
import Test from './pages/test'
import Start from './pages/start'
import Error from './pages/error'
import Colloection from './pages/colloection'
import StartTest from './pages/startTest'
import End from './pages/end'
import Analysis from './pages/analysis'
function App() {

  return (
    <ConfigProvider locale={zhCN}>
    <Suspense>
      <HashRouter>
        <Routes>
        <Route path='/' element={<Navigate to='/reg'></Navigate>}></Route>
        <Route path='/reg' element={<Register></Register>}></Route>
        <Route path='/login' element={<Login></Login>}></Route>
        <Route path='/index' element={<Index></Index>}></Route>
        <Route path='/test' element={<Test></Test>}></Route>
        <Route path='/start' element={<Start></Start>}></Route>
        <Route path='/error' element={<Error></Error>}></Route>
        <Route path='/collection' element={<Colloection></Colloection>}></Route>
        <Route path='/starttest' element={<StartTest></StartTest>}></Route>
        <Route path='/end' element={<End></End>}></Route>
        <Route path='/analysis' element={<Analysis></Analysis>}></Route>
        </Routes>
      </HashRouter>
    </Suspense>
  </ConfigProvider>
  )
}

export default App
